﻿<UserControl 
    x:Class="DiscoveryLogic.UI.Filters.EntitySearcher"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:Grid="clr-namespace:UI.Grid;assembly=UI.Grid" 
    xmlns:Filters="clr-namespace:DiscoveryLogic.UI.Filters" 
    xmlns:Controls="clr-namespace:Microsoft.Windows.Controls;assembly=Microsoft.Windows.Controls" 
    >
    <UserControl.Resources>
        <Style x:Key="RoundedTextBox" TargetType="TextBox">
            <Setter Property="BorderThickness" Value="2"/>
            <Setter Property="Background" Value="White"/>
            <Setter Property="Foreground" Value="#FF000000"/>
            <Setter Property="Padding" Value="0"/>
            <Setter Property="FontSize" Value="12"/>
            <Setter Property="BorderBrush" Value="#FFFFA500"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="TextBox">
                        <Grid x:Name="RootElement">
                            <Border x:Name="Border" Opacity="1" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="Chocolate"  CornerRadius="10" Background="White">
                                <ScrollViewer Height="Auto" x:Name="ContentElement" Width="Auto" BorderThickness="0" IsTabStop="False" Padding="{TemplateBinding Padding}" VerticalAlignment="Top" Margin="10,0,10,0"/>
                            </Border>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        
        <Style x:Key="TitleStyle" TargetType="TextBlock">
            <Setter Property="FontSize" Value="25"/> 
            <Setter Property="Foreground" Value="Blue"/>
        </Style>
        
        <Filters:SearchHistory x:Key="SearchHistory"/>
    </UserControl.Resources>
    <Border Padding="5" BorderThickness="0" CornerRadius="5"  Background="White">
        <StackPanel Orientation="Vertical" Background="White">
            <TextBlock x:Name="txtEntityType" Text="Organizations" Style="{StaticResource TitleStyle}"/>
            <StackPanel Background="Transparent" Orientation="Horizontal" VerticalAlignment="Center">
                <ComboBox x:Name="cboFields">
                    <ComboBoxItem>
						<TextBlock>Person name</TextBlock>
					</ComboBoxItem>
					<ComboBoxItem>
						<TextBlock>Email</TextBlock>
					</ComboBoxItem>
                </ComboBox>
                <TextBox x:Name="txtSearch" MinWidth="100" 
                     KeyDown="txtSearch_KeyDown" 
                     TextChanged="txtSearch_TextChanged"
                     Style="{StaticResource RoundedTextBox}">
                    <ToolTipService.ToolTip>
                        <ToolTip>
                            <Filters:SearchResultClassifier x:Name="SearchResultQuickAccess"/>
                        </ToolTip>
                    </ToolTipService.ToolTip>
                </TextBox>
				
                <!--<Controls:AutoCompleteBox 
                            IsTextCompletionEnabled="True"
                            Width="230" 
                            Margin="0, 8, 0, 8" HorizontalAlignment="Left"
                            ItemsSource="{StaticResource SearchHistory}"
                            Tag="Value2"
                            SelectionChanged="OnSelectionChanged"
                        />-->
                <ContentPresenter Name="Value2" />

            </StackPanel>
            <Grid:EntityGridView/>
        </StackPanel>
    </Border>
</UserControl>
